package com.groupware.message.DaoImpl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.groupware.message.Vo.MessageVo;
import com.groupware.message.mybatis.MessageManager;

@Component

public class MessageDaoImpl {
	public String getSender(String userName){
			return MessageManager.getSender(userName);
	}
	
	public void insertMessage(MessageVo vo){
		MessageManager.insertMessage(vo);
	}
	
	public List<MessageVo> getList(){
		List<MessageVo> list = MessageManager.getList();
		return list;
	}
	
	public MessageVo getMessage(String receiver){
		MessageVo vo = MessageManager.getmessage(receiver);
		return vo;
	}

	public List<MessageVo> getReceiveMail(String userName) {
		List<MessageVo> list = MessageManager.getReceiveMail(userName);
		return list;
	}
	public List<MessageVo> getSendMail(String userName) {
		List<MessageVo> list = MessageManager.getSendMail(userName);
		return list;
	}
	
	public int getCount(){
		int count = MessageManager.getCount();
		return count;
	}
	
	public List<MessageVo> getPage(int start, int end) {
		List<MessageVo> list = MessageManager.getPage(start, end);
		return list;
	}
	
	
	



}
